package com.sky.mapper;


import com.sky.dto.GoodsSalesDTO;
import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderDetailMapper {
    /**
     * 批量插入订单明细数据
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单详细表
     * @param ordersId
     * @return
     */
    List<OrderDetail> getByOrdersId(Long ordersId);

    /**
     * 查询前10的菜品
     * @param begin
     * @param end
     * @return
     */
    List<GoodsSalesDTO> top10(LocalDateTime begin, LocalDateTime end);
}
